﻿$("#printdocument").live("click", function () {
    var divContents = $("#news-content").html();
    var pW = window.open('', '', 'height=800,width=1000,scrollbars=1,status=1,modal=yes,alwaysRaised=yes');
    pW.document.write('<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Bản in tin tức</title>');
    pW.document.write('<link media="all" rel="stylesheet" href="css/all.css" />');
    pW.document.write('<link rel="stylesheet" type="text/css" media="screen" href="css/menu.css" />');
    pW.document.write('<link rel="stylesheet" type="text/css" media="screen" href="css/jquery-ui.css" />');
    pW.document.write('<script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>');
    pW.document.write('<style>');
    pW.document.write('     .no-print { display: none !important; }');
    
    pW.document.write('     #printPreview { margin-left:10px; margin-right:10px; }');
    pW.document.write('</style>');
    pW.document.write('</head><body id="printPreview">');
    pW.document.write(divContents);
    pW.document.write('<script type="text/javascript">');
    pW.document.write(      '$(document).ready(function () {');
    pW.document.write('         $(".printing").show()');
    pW.document.write('     });');
    pW.document.write('</script>');
    pW.document.write('</body>');
    pW.document.write('</html>');
    pW.document.close();
    pW.print();
    
});

    
